package com.ruoyi.interfaced.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.interfaced.mapper.ShopAddressInterMapper;
import com.ruoyi.interfaced.domain.ShopAddressInter;
import com.ruoyi.interfaced.service.IShopAddressInterService;

/**
 * 地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-07
 */
@Service
public class ShopAddressInterServiceImpl implements IShopAddressInterService
{
    @Autowired
    private ShopAddressInterMapper shopAddressMapper;

    /**
     * 添加地址
     * @return
     */
    @Override
    public int insert(ShopAddressInter shopAddress)
    {
        return shopAddressMapper.insert(shopAddress);
    }

    /**
     * 修改地址
     */

    @Override
    public int update(ShopAddressInter shopAddress)
    {
        return shopAddressMapper.update(shopAddress);
    }

    /**
     * 删除地址
     */
    @Override
    public int delete(ShopAddressInter shopAddress)
    {
        return shopAddressMapper.delete(shopAddress);
    }


    /**
     * 查询地址
     * 
     * @param shopId 地址主键
     * @return 地址
     */
    @Override
    public ShopAddressInter selectShopAddressByShopId(Long shopId)
    {
        return shopAddressMapper.selectShopAddressByShopId(shopId);
    }

    /**
     * 查询地址列表
     * 
     * @param shopAddress 地址
     * @return 地址
     */
    @Override
    public List<ShopAddressInter> selectShopAddressList(ShopAddressInter shopAddress)
    {
        return shopAddressMapper.selectShopAddressList(shopAddress);
    }

    /**
     * 新增地址
     * 
     * @param shopAddress 地址
     * @return 结果
     */
    @Override
    public int insertShopAddress(ShopAddressInter shopAddress)
    {
        return shopAddressMapper.insertShopAddress(shopAddress);
    }

    /**
     * 修改地址
     * 
     * @param shopAddress 地址
     * @return 结果
     */
    @Override
    public int updateShopAddress(ShopAddressInter shopAddress)
    {
        return shopAddressMapper.updateShopAddress(shopAddress);
    }

    /**
     * 批量删除地址
     * 
     * @param shopIds 需要删除的地址主键
     * @return 结果
     */
    @Override
    public int deleteShopAddressByShopIds(Long[] shopIds)
    {
        return shopAddressMapper.deleteShopAddressByShopIds(shopIds);
    }

    /**
     * 删除地址信息
     * 
     * @param shopId 地址主键
     * @return 结果
     */
    @Override
    public int deleteShopAddressByShopId(Long shopId)
    {
        return shopAddressMapper.deleteShopAddressByShopId(shopId);
    }
}
